Adwaita: Improve columnview styling
authornana-4 <hnmaigo@gmail.com>
Tue, 22 Sep 2020 01:37:04 +0000 (10:37 +0900)
committernana-4 <hnmaigo@gmail.com>
Tue, 22 Sep 2020 01:37:04 +0000 (10:37 +0900)
- Move padding from parent row to child cell.
- Align horizontal sizing of cell with header button.
- Properly support GtkColumnView:show-column-separators.
- Change cell height with and without .data-table.

gtk/theme/Adwaita/_common.scss

index 35788a84c46af056244e190ef27d35f85dd6630d..fe5faee0df12fea0a72f07152449dcfd7e9549e0 100644 (file)
@@ -3116,6 +3116,33 @@ row {
   }
 }
 
+columnview {
+  // move padding to child cells
+  > listview > row {
+    padding: 0;
+
+    // align horizontal sizing with header buttons
+    > cell {
+      padding: 8px 6px;
+
+      &:not(:last-child) {
+        border-right: 1px solid transparent;
+      }
+    }
+  }
+
+  // make column separators visible when :show-column-separators is true
+  &.column-separators > listview > row > cell {
+    border-right-color: $_treeview_borders_color;
+  }
+
+  // shrink vertically for .data-table
+  &.data-table > listview > row > cell {
+    padding-top: 2px;
+    padding-bottom: 2px;
+  }
+}
+
 /********************************************************
  * Data Tables                                          *
  * treeview like tables with individual focusable cells *